package com.content.Controller.drama;


import com.common.Entity.Result;
import com.content.Entity.drama.Video;
import com.content.Service.drama.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/drama/video")
public class VideoController {
    @Autowired
    private VideoService videoService;

    @PostMapping("/addVideo")
    public Result addVideo(@RequestBody Video video) {
        videoService.addVideo(video);
        return Result.success();
    }

    @PutMapping("/updateVideo")
    public Result updateVideo(@RequestBody Video video) {
        videoService.updateVideo(video);
        return Result.success();
    }

    @DeleteMapping("/deleteVideo/{videoId}")
    public Result deleteVideo(@PathVariable("videoId") String videoId) {
        videoService.deleteVideo(videoId);
        return Result.success();
    }

}
